Adding a TextArea Field to a Form

A text area is multi-line text input control. A user can write unlimited number of characters in the text area by using the <textarea> tag. Any text that you enter within this tag appears in the text area. The rows and cols attributes of the tag can be used to define the number of rows and columns in the text area.

Let’s do the following steps to add a text area:


<!DOTYPE html>
<head>
    <title>Adding a Textarea to the web page</title>
</head>
<body>
<center>
    <h2>Example of Text Area </h2>
    <form>
        Write a comment :
        <textarea rows=”6” cols=”10” >
        This is an example of text area on the web page, a User can input text in this area.
        </textarea>
    </form>
</center>
</body>
</html>

Save the document with the name AddingTextArea.html and open on browser.